<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

    </style>
</head>

<body>
    <textarea name="" id="" cols="30" rows="10"></textarea>
    <button>请仔细阅读(<span>10</span>)</button>

</body>
<script>
    let i = 10;
    document.querySelector('button').style.border = '1px solid #000';
    let times = setInterval(function () {
        i--;
        document.querySelector('span').innerText = i;
        document.querySelector('button').style.backgroundColor = '#ccc';
        document.querySelector('button').style.cursor = 'not-allowed';

        if (i == 0) {
            document.querySelector('button').innerText = '同意';
            document.querySelector('button').style.backgroundColor = 'rgb(0, 150, 25)';
            document.querySelector('button').style.cursor = '';
            clearInterval(times);
        }
        console.log(i);
    }, 1000);
</script>

</html>